/*
 * File:   Rule.h
 * Author: Elevator
 *
 * Created on 18 Май 2013 г., 21:43
 */

#ifndef RULE_H
#define RULE_H

#include "Command.h"
#include "Action.h"

class Rule
{
public:
	Rule( const Command& command, const Action& action );
	Rule( const Rule& rule );

	const Command& GetCommand( ) const;
	const Action& GetAction( ) const;

	bool Check( const Command& command ) const;
private:
	Command _command;
	Action _action;
};

inline bool operator ==(const Rule& a, const Rule& b )
{
	return a.GetCommand( ) == b.GetCommand( ) && a.GetAction( ) == b.GetAction( );
}

#endif	/* RULE_H */
